package com.gcsoftware.web.beans.elasticsearchData;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * ES返回实体类
 * @author czp
 * date : 2018-03-31
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class QueryAggs<T> extends QueryHits<T> {
    @JsonProperty("aggregations")
    private Aggs aggregations;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("aggregations", aggregations)
            .toString();
    }

    public Aggs getAggregations() {
        return aggregations;
    }

    public void setAggregations(Aggs aggregations) {
        this.aggregations = aggregations;
    }
}
